<?php
header("content-type:text/html;charset=utf-8");

$db=new mysqli("localhost","root","root","mogujie");

$username=$_POST["username"];
$pwd=$_POST["pwd"];
$phone=$_POST["phone"];

$sql="INSERT INTO register (username,pwd,phone) VALUES ('${username}','${pwd}',$phone)";

$flag=$db->query($sql);
if($flag){
    echo '{"ok":true}';
}else{
    echo '{"ok":false}';
}
?>